package com.changgou.user.feign;

import com.changgou.entity.Result;
import com.changgou.user.pojo.Address;
import com.changgou.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author LQQ
 * @Date 2020/3/10 16:28
 * @Version 1.0
 */
@FeignClient( name = "user")//声明它是一个feign的功能接口
public interface UserFeign {

    @GetMapping("/user/load/{username}")
    public User findUserInfo(@PathVariable("username") String username);

    @GetMapping("/address/list")
    public Result<List<Address>> list();

//
//    @PostMapping("/user/points/add")
//    public Result addUserPoints(@RequestParam(value = "point") Integer point);
}
